package com.cskaoyan.util;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

/**
 * @author Yuye Wang
 * @date 2023/5/30 13:20
 * @description TODO
 */
public class ConfigPropertiesUtil {
    private static Properties properties = new Properties();

    static {
        InputStream inputStream = ConfigPropertiesUtil.class.getClassLoader().getResourceAsStream("config.properties");
        try {
            properties.load(new InputStreamReader(inputStream, "GBK"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getValue(String key) {
        return properties.getProperty(key);
    }
}
